import java.util.Scanner;

/**
 * @author gao
 * @date 2025/10/9 18:35
 */

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNext()) {
            int n = in.nextInt();
            in.nextLine();
            for (int i = 0; i < n; i++) {
                String s = in.nextLine();
                if (isHappy(s)) {
                    System.out.println("Yes");
                } else {
                    System.out.println("No");
                }
            }
        }
    }

    public static boolean isHappy(String s) {
        String[] words = {"cheerful", "glad", "happy", "pleased"};
        for (String word : words) {
            if (s.contains(word)) {
                return true;
            }
        }
        return false;
    }
}